Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent circular import crash #381

Merged
merged 2 commits into from
Apr 8, 2021

Conversation

TwitchBronBron
Copy link
Member

Resolves an issue where circular imports will cause an infinite notification loop in DependencyGraph.
Fixes #377

@@ -489,7 +489,7 @@ export class XmlFile {

if (this.needsTranspiled || extraImportScripts.length > 0) {
//temporarily add the missing imports as script tags
const originalScripts = this.ast.component.scripts;
const originalScripts = this.ast.component?.scripts ?? [];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to this PR. Just a little extra safeguarding around potentially-broken component AST.

@TwitchBronBron TwitchBronBron merged commit 61314fa into master Apr 8, 2021
@TwitchBronBron TwitchBronBron deleted the fix-import-circular-dependency-crash branch April 8, 2021 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Namespaces that import each other can cause a circular dependency issue
2 participants